package com.ylb.rent.service.impl;

import com.ylb.rent.dao.RoleDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.stereotype.Service;

import java.util.Collection;

/**
 * @AUTHOR:游李滨
 * @DATE:2023/6/28 16:53
 */
@Service("ss")
public class SecurityService {



    public boolean hasPermi(String auth){

//        Collection<? extends GrantedAuthority> authorities = SecurityContextHolder.getContext().getAuthentication().getAuthorities();
//        SimpleGrantedAuthority simpleGrantedAuthority = new SimpleGrantedAuthority(auth);
//        boolean contains = authorities.contains(simpleGrantedAuthority);
//
//        return  contains;
        return true;
    }
}
